package com.king.springframework.beans.factory;


import com.king.springframework.beans.BeanException;

/**
 * spring 容器顶级接口
 */
public interface BeanFactory {
    /**
     * 根据名称获取一个Bean对象
     * @param beanName
     * @return
     * @throws BeanException
     */
    Object getBean(String beanName) throws BeanException;

    /**
     * 根据名称和参数获取一个Bean对象
     * @param beanName
     * @param args
     * @return
     */
    Object getBean(String beanName,Object... args) throws BeanException;

    <T> T getBean(String beanName,Class<T> requredType) throws BeanException;

    <T> T getBean(Class<T> requiredType) throws BeanException;
}
